﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Collections.TreeCollections;
using EventLogAssembly;

namespace FeatureModel.Collections.TreeArgs
{
    public class TreeObjectCreatedEventArgs : TreeEventArgs
    {
        public Type TreeObjectType { get; protected set; }
        public INonLeaf Parent { get; protected set; }
        public object[] NewTreeObjectArgs { get; protected set; }
        public TreeNodeIdentify NewObjectId { get;  protected set; }
        public bool TreeObjectCreated { get; set; }
        public INonRoot CreatedObject { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="treeObjType"></param>
        /// <param name="parent"></param>
        /// <param name="args"></param>
        /// <param name="id"></param>
        public TreeObjectCreatedEventArgs(object sender, string info, int eventId
            , Type treeObjType, INonLeaf parent, object[] args
            , TreeNodeIdentify id)
            : base(sender, info, eventId)
        {
            this.TreeObjectType = treeObjType;
            this.Parent = parent;
            this.NewTreeObjectArgs = args;
            this.NewObjectId = id;

            this.TreeObjectCreated = false;
            CreatedObject = null;
        }
    }
}
